how to change a value inside a array of obejcts